Skip to content

Conversation

@chrismaree
Copy link
Member

Problem
Throughout the codebase, when the safeTransferFrom function is used to transfer assets into the
system from an external address there is an implicit requirement that the external address has already
granted the appropriate approvals.
For instance:

  • The proposeRootBundle function relies on safeTransferFrom which requires that HubPool has
    been granted an allowance of bondAmount bondTokens by the caller.
  • The addLiquidity function relies on safeTransferFrom, requiring that the HubPool has been
    granted an l1TokenAmount allowance of the caller's l1Token.

Solution:
This PR addresses this issue by adding additional comments.

Signed-off-by: chrismaree <christopher.maree@gmail.com>
@chrismaree chrismaree added the OZ Audit - March Resolves issue discovered in March 2022 OZ Audit label Mar 16, 2022
@mrice32 mrice32 self-requested a review March 17, 2022 12:27
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

chrismaree and others added 7 commits March 18, 2022 07:29
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Co-authored-by: nicholaspai <9457025+nicholaspai@users.noreply.github.com>
Merge branch 'master' into chrismaree/n13
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Audit - March Resolves issue discovered in March 2022 OZ Audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants